package com.yijianonghu.service.wxwebsite.sannongdongtai;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

import org.springframework.stereotype.Service;

import com.yijianonghu.dal.model.ProBlogDetail;
import com.yijianonghu.dal.model.ProBlogDetailExample;

import net.javahub.service.BaseService;

@Service
public class SanNongDongTaiDetailService extends BaseService<ProBlogDetail, Integer, ProBlogDetailExample>{

	//三农动态详情
	public String getSanNongDongTaiDetail(Integer id) throws ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException{
		ProBlogDetailExample example=new ProBlogDetailExample();
		example.createCriteria().andIdEqualTo(id);
		List<ProBlogDetail> detailList=selectListByExampleWithBlobs(ProBlogDetail.class, example);
		if(detailList!=null && (!detailList.isEmpty())){
			ProBlogDetail proBlogDetail=detailList.get(0);
			if(proBlogDetail!=null){
				String detail=proBlogDetail.getBlogDetail();
				return detail;
			}
		}
		return null;
	}
}
